{% extends "management/base.html" %}
{% block title %}添加地理底图{% endblock %}

{% block content %}

    <div class="container">
        <div class="row">
            <div class="col-md-6 col-md-offset-3 col-sm-10 col-sm-offset-1">
                {% if state == 'success' %}
                    <div class="well">
                        <h2 class="text-success text-center">添加成功</h2>
                    </div>
                {% elif state == 'error' %}
                    <div class="well">
                        <h2 class="text-danger text-center">添加失败</h2>
                    </div>
                {% endif %}
                <form method="POST" role="form" class="form-horizontal" enctype="multipart/form-data">
                    {% csrf_token %}
                    <h2 class="fontmain text-center">添加地理底图</h2>

                    <div class="form-group">
                        <label for="id_name" class="col-md-3 control-label">名称：</label>

                        <div class="col-md-9">
                            <input type="text" placeholder="名称必须唯一"  class="form-control" id="id_name" required name="name" autofocus>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="id_scale" class="col-md-3 control-label">比例尺：</label>

                        <div class="col-md-9">
                            <select name="scale" id="id_scale" class="form-control">
                                <option value="1：900万">1：900万</option>
                                <option value="1：1600万">1：1600万</option>
                                <option value="1：2000万">1：2000万</option>
                                <option value="1：4000万">1：4000万</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="id_type" class="col-md-3 control-label">地图要素：</label>
                        <div class="col-md-9">
                            <select name="type" id="id_type" class="form-control">
                                <option value="社会经济图类">社会经济图类</option>
                                <option value="自然、资源类">自然、资源类</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="id_projection" class="col-md-3 control-label">地图投影：</label>
                        <div class="col-md-9">
                            <select name="projection" id="id_projection" class="form-control">
                                <option value="双标准纬线等面积圆锥投影">双标准纬线等面积圆锥投影</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="id_grade" class="col-md-3 control-label">行政级别：</label>
                        <div class="col-md-9">
                            <select name="grade" id="id_grade" class="form-control">
                                <option value="国家">国家</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="id_area" class="col-md-3 control-label">区域范围：</label>
                        <div class="col-md-9">
                            <select name="area" id="id_area" class="form-control">
                                <option value="中国">中国</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="id_img" class="col-md-3 control-label">文件：</label>
                        <div class="col-md-9">
                            <input type="file" id="id_file" name="file" class="form-control" required>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-md-4 col-md-offset-4">
                            <button class="btn btn btn-primary btn-block" type="submit">提交</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>


{% endblock %}